home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / blitzbasic / riblitzlibs.lha / riblitzlibs / wb / WB_library.DOC < prev    next >
Text File  |  1994-04-26  |  6KB  |  204 lines

  1. ;------------------------------
  2. ;- WB library version 0.9     -
  3. ;- ©1994 Reflective Images    -
  4. ;------------------------------
  5.  
  6. This small library provides quick and easy to use commands for accessing
  7. AppWindows, AppIcons and AppMenus.
  8.  
  9. * PLEASE NOTE * 
  10. This library must have at least V37+ of Workbench/DOS/Icon libraries
  11.  
  12. This version of the library only enables you to read the FIRST file
  13. dragged to an AppWindow/AppIcon or selected from an AppMenu - future
  14. versions will have additional commands AppWindowArg/AppIconArg/AppMenuArg
  15. which returns the filename of the specified arg. E.g. f$=AppIconArg(1)
  16.  
  17. Command List:
  18.  
  19.     AppEvent()
  20.     AppWindowEvent()
  21.     AppIconEvent()
  22.     AppMenuEvent()
  23.     AddAppWindow()
  24.     AddAppIcon()
  25.     AddAppMenu()
  26.     DelAppWindow()
  27.     DelAppIcon()
  28.     DelAppMenu()
  29.     AppWindowFile()
  30.     AppIconFile()
  31.     AppIconHit()
  32.     AppMenuFile()
  33.     AppMenuHit()
  34.  
  35.  
  36. Function : AppEvent
  37. ------------------------------------------------------------------------------
  38. Modes  : Amiga
  39. Syntax : status=AppEvent
  40.  
  41. This command checks the msg ports of any open AppIcons/AppWindows/AppMenus
  42. and if an event has been passed, returns -1. 0 indicates no event has
  43. occurred.
  44.  
  45. e.g.
  46.     Repeat
  47.       VWait
  48.     Until AppEvent
  49.  
  50.  
  51. Function : AppWindowEvent
  52. ------------------------------------------------------------------------------
  53. Modes  : Amiga
  54. Syntax : status=AppWindowEvent
  55.  
  56. This command checks the msg ports of any open AppWindows and if an event
  57. has been passed, returns -1. 0 indicates no event has occurred.
  58.  
  59. e.g.
  60.     Repeat
  61.       VWait
  62.     Until AppWindowEvent
  63.  
  64.  
  65. Function : AppIconEvent
  66. ------------------------------------------------------------------------------
  67. Modes  : Amiga
  68. Syntax : status=AppIconEvent
  69.  
  70. This command checks the msg ports of any AppIcons and if an event has been
  71. passed, returns -1. 0 indicates no event has occurred.
  72.  
  73. e.g.
  74.     Repeat
  75.       VWait
  76.     Until AppIconEvent
  77.  
  78.  
  79. Function : AppMenuEvent
  80. ------------------------------------------------------------------------------
  81. Modes  : Amiga
  82. Syntax : status=AppMenuEvent
  83.  
  84. This command checks the msg ports of any AppMenus and if an event has been
  85. passed, returns -1. 0 indicates no event has occurred.
  86.  
  87. e.g.
  88.     Repeat
  89.       VWait
  90.     Until AppMenuEvent
  91.  
  92.  
  93. Function : AddAppWindow
  94. -------------------------------------------------------------------------------
  95. Modes  : Amiga
  96. Syntax : success=AddAppWindow(windownumber)
  97.  
  98. This command attempts to make the window specified by 'windownumber' to become
  99. an AppWindow. -1 means success, 0 means failure. There is a currently
  100. limit of 4 AppWindows.
  101.  
  102.  
  103. Function : AddAppIcon
  104. -------------------------------------------------------------------------------
  105. Modes  : Amiga
  106. Syntax : success=AddAppIcon(id,text$,iconname$)
  107.  
  108. This command attempts to place an AppIcon onto the Workbench desktop.
  109. ID is a unique identification number. Text$ is text to display underneath
  110. the AppIcon and Iconname$ is the name of the file to use the Icon imagery.
  111. -1 means success, 0 means failure.
  112. e.g.
  113.     suc=AddAppIcon(0,"Test","Work:Test")
  114.     If suc=0 Then End
  115.     
  116.  
  117. Function : AddAppMenu
  118. -------------------------------------------------------------------------------
  119. Modes  : Amiga
  120. Syntax : success=AddAppMenu(id,text$)
  121.  
  122. This command tries to add 'text$' to the Tools menu of Workbench.
  123. ID is a unique identification number. Returns -1 for success, 0 for failure.
  124. e.g.
  125.     suc=AddAppMenu(0,"Blitz2")
  126.     If suc=0 Then End
  127.  
  128.  
  129. Function : AppWindowFile
  130. -------------------------------------------------------------------------------
  131. Modes  : Amiga
  132. Syntax : filename$=AppWindowFile(windownumber)
  133.  
  134. This command returns the complete path of the file which was dragged to the
  135. AppWindow. If the file was in fact a directory a '/' is appended.
  136. An empty string signifies nothing was Dragged.
  137.  
  138.  
  139. Function : AppIconFile
  140. ------------------------------------------------------------------------------
  141. Modes  : Amiga
  142. Syntax : filename$=AppIconFile(id)
  143.  
  144. This command returns the complete path of the file which was dragged to the
  145. AppIcon. If the file was in fact a directory a '/' is appended.
  146. An empty string signifies nothing was Dragged.
  147.  
  148.  
  149. Function : AppMenuFile
  150. ------------------------------------------------------------------------------
  151. Modes  : Amiga
  152. Syntax : filename$=AppMenuFile(id)
  153.  
  154. This command returns the complete path of the file which was selected when
  155. the AppMenu was hit. If the file was in fact a directory a '/' is appended.
  156. An empty string signifies nothing was selected.
  157.  
  158.  
  159. Function : AppIconHit
  160. ------------------------------------------------------------------------------
  161. Modes  : Amiga
  162. Syntax : status=AppIconHit(id)
  163.      idnumber=AppIconHit
  164.  
  165. This command returns the status of the AppIcon <id>. -1 = The icon was
  166. doubleclicked, 0 = nothing has happened.
  167. If no argument is supplied, the function returns the number of the
  168. doubleclicked icon, or -1 for none.
  169.  
  170.  
  171. Function : AppMenuHit
  172. ------------------------------------------------------------------------------
  173. Modes  : Amiga
  174. Syntax : status=AppMenuHit(id)
  175.      idnumber=AppMenuHit
  176.  
  177. This returns the status of the AppMenu item <id>. -1 = This menu
  178. item was selected, 0 = This menu item was not selected.
  179. If no argument is given, the function returns the numbe of the
  180. selected menu item, or -1 for none.
  181.  
  182.  
  183. Function : DelAppWindow/DelAppIcon/DelAppMenu
  184. ------------------------------------------------------------------------------
  185. Modes  : Amiga
  186. Syntax : success=DelAppWindow[(number)]
  187.      success=DelAppIcon[(id)]
  188.      success=DelAppMenu[(id)]
  189.  
  190. These commands will remove the AppWindow/AppIcon/AppMenu from the system
  191. and free up the associated message ports.
  192.  
  193. *** IMPORTANT *** You must call DelAppWindow BEFORE closing a window,
  194. or your machine will GURU!
  195.  
  196.  
  197.  
  198.  
  199. -----------------======= T H E   E N D ======------------------------
  200. Enjoy!
  201.  
  202. Steve.
  203.  
  204.